/*******************************************************************************
* @Filename      : app.h

* @Description   : app.h

* @Version       : 1.0.0

* @Date          : 2023.09.25
*******************************************************************************/

#ifndef __APP_H
#define __APP_H

#ifdef __cplusplus
 extern  "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "bsp.h"
#include "imagelist.h"
#include "lcd_config.h"
//#include "timer_app.h"
//#include "disp_app.h"
//#include "env_app.h"
//#include "com_app.h"
#define __ELECTRIC_TOOTHBRUSH__

#define __TB_UI_1__  // UI 1 ,font more
//#define __TB_UI_2__  // UI 2,font + icon
//#define __TB_UI_3__  // UI 3,color + font
/* Exported types ------------------------------------------------------------*/
typedef enum _HEAT_STATE_E
{
    HEAT_STATE_IDLE,
    HEAT_STATE_DOING,
}HEAT_STATE_E;

typedef enum _CHG_STATE_E
{
    CHG_STATE_IDLE,
    CHG_STATE_DOING,
}CHG_STATE_E;

typedef enum _RUN_STATE_E
{
    start,
    pause,
    running,
    sleep,
    wakeup,
}RUN_STATE_E;
typedef enum _WORK_STATE_E
{
    CLEAN,
    M_WHITE,
    SENSITIVE,
    REFRESH,
    GUM_CARE
}WORK_STATE_E;
	
typedef struct {
   WORK_STATE_E work_mode;
   uint8_t strength_level;
   uint8_t battery_level;
   uint8_t tp_touch_region;
   RUN_STATE_E state;
} Device_State_Def;

/* Exported define -----------------------------------------------------------*/
#define MEASURE_FILAMENT_INTERVAL   0xffff
/* Exported constants --------------------------------------------------------*/
#define GAP_HEIGH       4
#define BATTERY_HEIGH  16
#define CLOCK_HEIGH    24
#define ENGLISH_CHAR_WIDTH    8
#define ENGLISH_CHAR_HEIGH    16
#define CHINESE_CHAR_WIDTH    16
#define CHINESE_CHAR_HEIGH    16
/* Exported variables --------------------------------------------------------*/
#define DEFUALT_RUM_TIME      10
/* Exported functions --------------------------------------------------------*/

bool battery_level_change(void);

void show_battery_level(void);

void Update_remainder_time(uint8_t cnt);

void show_run_time_and_icon(void);

void show_strength_level_and_icon(void);

void show_work_mode(void);

void show_start_stop_off(void);

void Show_lcd_main_interface(void);

void Adc_check_Battery_value(void);

void run_time_update(void);

void APP_Process(void);

#ifdef __cplusplus
}
#endif
#endif

/* End of File ---------------------------------------------------------------*/
